xc: export outstanding_pages value in xc_dominfo structure.
authorDan Magenheimer <dan.magenheimer@oracle.com>
Mon, 25 Feb 2013 20:10:08 +0000 (15:10 -0500)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 16 Apr 2013 15:21:50 +0000 (16:21 +0100)
This patch provides the value of the currently outstanding pages
claimed for a specific domain. This is a value that influences
the global outstanding claims value (See patch: "xl: 'xl info'
print outstanding claims if enabled") returned via
xc_domain_get_outstanding_pages hypercall. This domain value
decrements as the memory is populated for the guest and
eventually reaches zero.

This patch is neccessary for "xl: export 'outstanding_pages' value
from xcinfo" patch.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
[v2: s/unclaimed_pages/outstanding_pages/ per Tim's suggestion]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxc/xc_domain.c
tools/libxc/xenctrl.h

index 299c9073b7fd4bccec91df854e9d30b839ce9ec4..1676bd7455f6af36e493ba8d2489de2e100fd76c 100644 (file)
@@ -234,6 +234,7 @@ int xc_domain_getinfo(xc_interface *xch,
 
         info->ssidref  = domctl.u.getdomaininfo.ssidref;
         info->nr_pages = domctl.u.getdomaininfo.tot_pages;
+        info->nr_outstanding_pages = domctl.u.getdomaininfo.outstanding_pages;
         info->nr_shared_pages = domctl.u.getdomaininfo.shr_pages;
         info->nr_paged_pages = domctl.u.getdomaininfo.paged_pages;
         info->max_memkb = domctl.u.getdomaininfo.max_pages << (PAGE_SHIFT-10);
index 19e34b290ece1a3a5cf1f74ca80ec052c36f60f4..9676a9f37b7f8ea3ee3854d64e5046e2e44659a8 100644 (file)
@@ -368,6 +368,7 @@ typedef struct xc_dominfo {
                   hvm:1, debugged:1;
     unsigned int  shutdown_reason; /* only meaningful if shutdown==1 */
     unsigned long nr_pages; /* current number, not maximum */
+    unsigned long nr_outstanding_pages;
     unsigned long nr_shared_pages;
     unsigned long nr_paged_pages;
     unsigned long shared_info_frame;